﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace QlrrPrintService.Common.Command
{
    /// <summary>
    /// 設定印表機的列印濃度
    /// </summary>
    public class Density:IToTSPLCommand
    {
        private int _n = 7;

        public int N
        {
            get { return _n; }
            set { _n = value; }
        }

        #region IToTSPLCommand 成员

        public byte[] ToTSPLCommandByte(int mm_to_dot)
        {
            return Util.GetEncodingBytes(ToTSPLCommandAscii(mm_to_dot));
        }

        public string ToTSPLCommandAscii(int mm_to_dot)
        {
            return string.Format("DENSITY {0}{1}", _n, Common.TSPL_END);
        }

        #endregion
    }
}
